mention-java-common-package
authorDebian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Mon, 27 Aug 2012 16:47:58 +0000 (16:47 +0000)
committerRene Engelhard <rene@debian.org>
Mon, 27 Aug 2012 16:47:58 +0000 (16:47 +0000)
===================================================================

Gbp-Pq: Name mention-java-common-package.diff

jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
svtools/source/java/javainteractionhandler.cxx

index f72caeb9d62e6ce2242623e2b629b8fcbbf94d2d..58266a6c56ee422fcbb8bddbfbdfc058ebddf567 100644 (file)
@@ -169,6 +169,9 @@ static bool findAndSelect(JavaInfo ** ppInfo)
     if (errcode == JFW_E_NO_JAVA_FOUND)
     {
         fprintf(stderr,"javaldx: Could not find a Java Runtime Environment! \n");
+        fprintf(stderr,"Please ensure that a JVM and the package libreoffice-java-common\n");
+        fprintf(stderr,"is installed.\n");
+        fprintf(stderr,"If it is already installed then try removing ~/.libreoffice/3/user/config/javasettings_Linux_*.xml\n");
         return false;
     }
     else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE)
index 9569ff295124f8675c1f6859622b1730622d2da2..7845b77513e34b0245e0180874ba095d65f4a1db 100644 (file)
 #include <svtools/javainteractionhandler.hxx>
 #include <svtools/javacontext.hxx>
 
+#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
+
 using namespace com::sun::star::uno;
 using namespace com::sun::star::task;
-
 namespace svt
 {
 
@@ -157,6 +158,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
 #endif
             String aTitle( SvtResId(STR_WARNING_INVALIDJAVASETTINGS));
             aWarningBox.SetText( aTitle );
+            String aText = String(aWarningBox.GetMessText());
+            aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality."));
+            aWarningBox.SetMessText( aText );
             nResult = aWarningBox.Execute();
         }
         else
@@ -174,6 +178,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
             QueryBox aQueryBox( NULL, SvtResId( QBX_JAVADISABLED ) );
             String aTitle( SvtResId( STR_QUESTION_JAVADISABLED ) );
             aQueryBox.SetText( aTitle );
+            String aText = String(aQueryBox.GetMessText());
+            aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality."));
+            aQueryBox.SetMessText( aText );
             nResult = aQueryBox.Execute();
             if ( nResult == RET_YES )
             {
@@ -220,6 +227,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
             ErrorBox aErrorBox(NULL, SvtResId( ERRORBOX_RESTARTREQUIRED ) );
             String aTitle( SvtResId( STR_ERROR_RESTARTREQUIRED ) );
             aErrorBox.SetText( aTitle );
+            String aText = String(aErrorBox.GetMessText());
+            aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality."));
+            aErrorBox.SetMessText( aText );
             nResult = aErrorBox.Execute();
         }
         else